home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
178_01
/
tvx_defs.ic
< prev
next >
Wrap
Text File
|
1986-01-16
|
12KB
|
286 lines
/* ----------------------------->>> tvx_defs.ic <<<---------------------
TVX - A full screen editor written in C
Revison summary:
Version
7/15/85 - Official Public Release Version
7/18/85 - added -b (-b to -l, -b new) switch for Unix compatibility
8/22/85 - fixed bug with setdscrl
9/20/85 - major revision: some minor bug fixes
added editrpt, storerpt, execrpt, spare1, spare2
major changes to file handling
9/30/85 - of course, bugs...
10/6/85 - I like this date.
10/18/85 - bug in autoindent with insert message
10/25/85 - 0<tab>, ^A wild to ^C because of insert problem
11/7/85 - Atari version
11/12/85 - get find pattern added, some LASL stuff added, lex_def added
^C back to ^A
11/15/85 - added write save buffer
11/25/85 - minor bug with auto insert ### ins mode ### + reset in main
11/26/85 - added BUFFINDEX type for atari
11/27/85 - bug in lex_default with loops
1/10/86 - small bug in memory with long file names
********************************************************************* */
#include <stdio.h>
#define MSDOS /* 8086 MS-DOS */
#define NEED_MISC_DEFS /**/
/* ======================================================================== */
#ifdef NEED_MISC_DEFS
/* following definitons are usually not defined in most stdio.h's */
#define NIL (-1) /* nil ptr for lists */
#define TRUE 1
#define FALSE 0
#define FAST static
#define SLOW static
/* following might not be defined in some C's stdio.h, but usually are */
/* #define EOF (-1) */ /* standard end of file */
/* #define EOS '\0' */ /* standard end of string */
#endif
/* ======================================================================== */
#define VERSION " - TVX (1/10/86) - "
/* ======================================================================== */
/* ====> Select terminal version: #define at most ONE of <================= */
/* the following symbols debending the terminal used. (except SUN) */
#define IBMPC
/* #define ATARI520 */
/* #define VT100 */
/* #define HP2621 */
/*#define TERMCAP*/ /* Unix TERMCAP version */
/* #define SUN */ /* define for SUN in addition to TERMCAP */
/* ======================================================================== */
/* ==================> Select ONE operating system <====================== */
#undef OSCPM /* CP/M-80 */
#undef GEMDOS /* atari 520 gemdos */
/*#define UNIX */ /* unix is a bit different! */
/* ======================================================================== */
/* ========> select other options by defining appropriate symbols <======== */
#define VB /**/ /* whether or not to create backup log version */
#undef ULBD /* supports underline, bold in ^U, ^B format */
#define STATREPEAT /* define for Rpt: on status line (undef STATCURLINE) */
#undef STATCURLINE /* define for Cur line on stat line (undef STATREPEAT) */
/* ********************************************************************** */
/* ********************************************************************** */
/* Other options now selected automatically depending on above #defines */
/* ********************************************************************** */
/* ********************************************************************** */
/* ---------------- Operating System dependent defintions --------------- */
/* important note: max value for REPEATBUFS is 9! */
/* ---------------------------------------------------------------------- */
#ifdef OSCPM /* uses Software Toolworks C/80 */
#define BACKUPNAME "BACKUP.LOG" /* backup log file name */
#define BUFFLIMIT 2500 /* how much empty space to save in buffer */
#define FILEREAD "rb" /* read a file in binary */
#define FILEWRITE "wb" /* write a binary file */
#define FNAMESIZE 14 /* size of file names */
#define INT16 /**/ /* ints are 16 bits */
#define LINELIMIT 75 /* number of spare lines to save */
#define MAKE_BACKUP 1 /* 1 (true), want to make .bak file by default */
#define MAXBUFF 40000 /* maximum number of total characters */
#define MAXLINE 1150 /* maximum number of lines (abt. MAXBUFF/30) */
#define REPEATBUFS 3 /* number of repeat buffers allowed */
#define USELF /**/ /* using line feed on video */
#define FILELF /**/ /* also in files */
#define NEWLINE 13 /* 1st line separator: CR */
#define USECTRLZ /**/
#define NEEDTVLIB /**/ /* need standard c lib routines */
#define BUFFINDEX unsigned int
#endif
/* ---------------------------------------------------------------------- */
#ifdef MSDOS
#define HELP /**/ /* help available */
#define FULLHELP /**/ /* all of it */
#define CONFIGFILE /**/ /* allow -c switch */
#define BACKUPNAME "BACKUP.LOG" /* backup log file name */
#define BUFFLIMIT 3000 /* how much empty space to save in buffer */
#define FILEREAD "rb" /* read a file in binary */
#define FILEWRITE "wb" /* write a binary file */
#define FNAMESIZE 70 /* size of file names, allows paths */
#define INT16 /**/ /* ints are 16 bits */
#define LINELIMIT 75 /* number of spare lines to save */
#define MAKE_BACKUP 1 /* 1 (true), want to make .bak file by default */
#define MAXBUFF 60000 /* maximum number of total characters */
#define MAXLINE 3500 /* maximum number of lines (abt. MAXBUFF/30) */
#define REPEATBUFS 5 /* number of repeat buffers allowed */
#define USELF /**/ /* using line feed */
#define FILELF /**/ /* also in files */
#define NEWLINE 13 /* 1st line separator: CR */
#define BUFFINDEX unsigned int
/* #define USECTRLZ */
#endif
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
#ifdef GEMDOS
#define HELP /**/ /* help available */
#define FULLHELP /**/ /* all of it */
#define CONFIGFILE /**/ /* allow -c switch */
#define BACKUPNAME "BACKUP.LOG" /* backup log file name */
#define BUFFLIMIT 3000 /* how much empty space to save in buffer */
#define FILEREAD "r" /* read a file in binary */
#define FILEWRITE "w" /* write a binary file */
#define fopen fopenb
#define FNAMESIZE 70 /* size of file names, allows paths */
#define INT16 /**/ /* ints are 16 bits */
#define LINELIMIT 75 /* number of spare lines to save */
#define MAKE_BACKUP 1 /* 1 (true), want to make .bak file by default */
#define MAXBUFF 60000 /* maximum number of total characters */
#define MAXLINE 3500 /* maximum number of lines (abt. MAXBUFF/30) */
#define REPEATBUFS 5 /* number of repeat buffers allowed */
#define USELF /**/ /* using line feed */
#define FILELF /**/ /* also in files */
#define NEWLINE 13 /* 1st line separator: CR */
#define USECTRLZ /**/
#define BUFFINDEX long
#endif
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
#ifdef UNIX
#define getchr fgetc
#define FLOWCONTROL /**/ /* define this if you want ^S/^Q enabled */
#undef COMMA_BAK /* #define if you want ".," backup files */
#define NO_EXTEND_CHAR /* only allow 127 displayable chars */
#define HELP /**/ /* help available */
#define FULLHELP /**/ /* all of it */
#define CONFIGFILE /**/ /* allow -c switch */
#define BACKUPNAME "BACKUP.LOG" /* backup log file name */
#define BUFFLIMIT 4000 /* how much empty space to save in buffer */
#define FILEREAD "r" /* read a file in binary */
#define FILEWRITE "w" /* write a binary file */
#define FNAMESIZE 80 /* size of file names, allows paths */
#define LINELIMIT 100 /* number of spare lines to save */
#define MAKE_BACKUP 1 /* 1 (true), want to make .B file by default */
/* change to 0 if don't want, which is like other Unix eds */
#define MAXBUFF 120000 /* maximum number of total characters */
#define MAXLINE 5000 /* maximum number of lines (abt. MAXBUFF/30) */
#define NEWLINE 10
#define REPEATBUFS 9 /* number of repeat buffers allowed */
#define USELF /**/ /* using line feed on screen */
#define BUFFINDEX unsigned int
#endif
/* -------------------------------------------